package T7_join;
public class T7_join {
	public static void main(String[] args) {
		Thread thread = new Thread(new MyThread("lang1"));
		thread.start();
		try {
			thread.join();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		run();
	}
	
	public static void run() {    
        for (int i = 0; i < 10; i++) { 
            System.out.println("main " + ": " + i);    
        }    
    }  
}
class MyThread implements Runnable {    
    private String name;    
  
    public MyThread(String name) {    
        this.name = name;    
    }    
    public void run() {    
        for (int i = 0; i < 10; i++) { 
            System.out.println(name + ": " + i);    
        }    
    }    
} 

